﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace KWT.DRG_DIP.API.Migrations
{
    /// <inheritdoc />
    public partial class _20250410173529 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Sys_Para");

            migrationBuilder.CreateTable(
                name: "Sys_DIP_Para",
                columns: table => new
                {
                    ParaID = table.Column<string>(type: "varchar(255)", nullable: false, comment: "")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disease_Code = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "DRG代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Disease_Type = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "DRG名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Diag_Code = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "主要诊断编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Diag_Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "主要诊断名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Oper_Code = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "主要手术操作编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Oper_Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "主要手术操作名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Other_Code = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "主要手术操作名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Other_Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "主要手术操作名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Score = table.Column<decimal>(type: "decimal(18,6)", precision: 6, nullable: false, comment: "病种分值"),
                    ZGDZ = table.Column<decimal>(type: "decimal(18,6)", precision: 6, nullable: false, comment: "职工点值"),
                    JMDZ = table.Column<decimal>(type: "decimal(18,6)", precision: 6, nullable: false, comment: "居民点值"),
                    ZGFFBZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "职工付费标准"),
                    JMFFBZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "居民付费标准"),
                    LJFY = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "例均费用"),
                    ZYTSBGZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "住院天数标杆值(天)"),
                    HighMag = table.Column<decimal>(type: "decimal(18,1)", precision: 1, nullable: false, comment: "高倍率"),
                    LowMag = table.Column<decimal>(type: "decimal(18,1)", precision: 1, nullable: false, comment: "低倍率"),
                    SpecialFlag = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "特殊标签")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    AddUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: false, defaultValueSql: "now()", comment: "创建时间"),
                    UpdUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UpdUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UpdTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: true, comment: "最后修改时间"),
                    DelUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DelUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DelTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: true, comment: "软删除时间"),
                    IsDel = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否软删除")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_DIP_Para", x => x.ParaID);
                },
                comment: "DIP分组标杆")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Sys_DRG_Para",
                columns: table => new
                {
                    ParaID = table.Column<string>(type: "varchar(255)", nullable: false, comment: "")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DRG_Code = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "DRG代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DRG_Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "DRG名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    QZ = table.Column<decimal>(type: "decimal(18,6)", precision: 6, nullable: false, comment: "权重"),
                    ZGFFBZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "职工付费标准"),
                    JMFFBZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "居民付费标准"),
                    LJFY = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "例均费用"),
                    ZYTSBGZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "住院天数标杆值(天)"),
                    HighMag = table.Column<decimal>(type: "decimal(18,1)", precision: 1, nullable: false, comment: "高倍率"),
                    LowMag = table.Column<decimal>(type: "decimal(18,1)", precision: 1, nullable: false, comment: "低倍率"),
                    IsSpecial = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否特病单议病组"),
                    SpecialFlag = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "特殊标签")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    AddUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: false, defaultValueSql: "now()", comment: "创建时间"),
                    UpdUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UpdUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UpdTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: true, comment: "最后修改时间"),
                    DelUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DelUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DelTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: true, comment: "软删除时间"),
                    IsDel = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否软删除")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_DRG_Para", x => x.ParaID);
                },
                comment: "DRG分组标杆")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Sys_DIP_Para");

            migrationBuilder.DropTable(
                name: "Sys_DRG_Para");

            migrationBuilder.CreateTable(
                name: "Sys_Para",
                columns: table => new
                {
                    ParaID = table.Column<string>(type: "varchar(255)", nullable: false, comment: "")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: false, defaultValueSql: "now()", comment: "创建时间"),
                    AddUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DRG_Code = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "DRG代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DRG_Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "DRG名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DelTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: true, comment: "软删除时间"),
                    DelUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DelUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    HighMag = table.Column<decimal>(type: "decimal(18,1)", precision: 1, nullable: false, comment: "高倍率"),
                    IsDel = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否软删除"),
                    IsSpecial = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否特病单议病组"),
                    JMFFBZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "居民付费标准"),
                    LJFY = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "例均费用"),
                    LowMag = table.Column<decimal>(type: "decimal(18,1)", precision: 1, nullable: false, comment: "低倍率"),
                    QZ = table.Column<decimal>(type: "decimal(18,6)", precision: 6, nullable: false, comment: "权重"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    SpecialFlag = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "特殊标签")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UpdTime = table.Column<DateTime>(type: "datetime(0)", precision: 0, nullable: true, comment: "最后修改时间"),
                    UpdUserID = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人ID")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UpdUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, defaultValue: "", comment: "创建人名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ZGFFBZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "职工付费标准"),
                    ZYTSBGZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "住院天数标杆值(天)")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_Para", x => x.ParaID);
                },
                comment: "")
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
